package com.springs.config;

import com.springs.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Configuration 也会被容器托管，也是@Component
 */
@Configuration
//@ComponentScan("com.springs.entity")
public class SpringConfig {

    /**
     * Bean方法的名字就是id
     * return就是class
     */
    @Bean
    public User getUser() {
        return new User();
    }
}
